cmake_minimum_required(VERSION 2.8)

project(idsredis_c)

include_directories(
        "${PROJECT_SOURCE_DIR}/vendor"
        $ENV{BOOST_ROOT}
)

IF (WIN32)
    include_directories("D:/bin/boost_1_60_0")
ELSEIF (APPLE)
    include_directories(
            "/usr/local/include"
    )
    link_directories(
            "/usr/local/lib"
    )
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lpthread -Wc++14-extensions -Winconsistent-missing-override")
ELSEIF (UNIX)
    include_directories("/usr/local/lib")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
ENDIF ()

link_directories("${PROJECT_SOURCE_DIR}/vendor/hiredis")

#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}  -L./vendor/hiredis")
set(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -std=c++11")

set(SOURCE_FILES main.cpp)

add_executable(idsredis_c ${SOURCE_FILES})

target_link_libraries(idsredis_c hiredis json-c)